#include <stdio.h>


int sum(int n) {
    if (n==0)
        return 0;
    else
        return (n + sum(n-1));
}

int main() {
    int n;
    printf("Please key-in number：");
    scanf("%d", &n);
    printf("1+2+...+%d = %d\n", n, sum(n));
}